$(document).ready(function(){
    var servicePoint={
        url:"http://localhost:9100/GetUserDetails",
        type:"GET",
        dataType:'JSON',
        success: function(data,service,requestObj){
            var userdetails=data.UserList;
            var tableString='';
            for(var i= 0 ; i < userdetails.length; i++){
                tableString  += '<tr><td>' + (i + 1) +'</td><td>'
                + userdetails[i].name + '</td><td>'+ userdetails[i].email
                + '</td><td>' + userdetails[i].address + '</td><td>' + userdetails[i].phone + '</td></tr>'
            }
            $('#usersList tbody').append(tableString);
        },
        error: function(requestObj,status,error){

        },
        complete: function(requestObj,status){

        }
    };
        //$('#userDetails').click(function(){
        //    $('#addUserDetails').load('form.html',function(){
        //        $('body').hide();
        //        //alert("Form Loaded");
        //    });
        //
        //});
    $.ajax(servicePoint);
});